package org.ali.structuralpattern.bridgepattern;

import org.ali.structuralpattern.bridgepattern.color.Color;
import org.ali.structuralpattern.bridgepattern.color.Red;
import org.ali.structuralpattern.bridgepattern.shape.Circular;
import org.ali.structuralpattern.bridgepattern.shape.Rectangle;
import org.ali.structuralpattern.bridgepattern.shape.Shape;

/**
 * 桥接模式
 */
public class Main {
    public static void main(String[] args) {
        Shape circular = new Circular();

        Color red = new Red();

        circular.setColor(red);
        circular.draw();

        Shape rectangle = new Rectangle();

        rectangle.setColor(red);
        rectangle.draw();
    }
}
